﻿using System;
using System.Collections.Generic;
using System.Linq;
using jQueryApi;
using jQueryUiApi;
using System.Collections;

public static class Examples
{
    public static void DoAccordian()
    {
        Dictionary icons = new Dictionary();
        icons["header"] = "ui-icon-circle-arrow-e";
        icons["headerSelected"] = "ui-icon-circle-arrow-s";

        Dictionary accordionOptions = new Dictionary();
        accordionOptions["icons"] = icons;

        jQueryUi.Select("#accordion").Accordion(accordionOptions);
    }

    public static void DoTabs()
    {
        jQueryObject jqObject = jQuery.Select("#tabs");
        DoTabsContinued(jqObject);
    }

    private static void DoTabsContinued(jQueryObject jqObject)
    {
        jQueryUiObject tabs = jQueryUi.Select(jqObject);

        Dictionary tabsOptions = new Dictionary();
        tabsOptions["event"] = "mouseover";

        tabs.Tabs(tabsOptions);
        tabs.Bind("tabsshow", OnTabsShow);
    }

    private static void OnTabsShow(jQueryEvent e, Dictionary ui)
    {
        jQuery.Select("#eventInfo").Text("Showing tab " + ui["index"]);
    }
}




